#include <stdio.h>
#include <stdlib.h>

int main (int argc, char *argv[])
{
	FILE *fp;
	char buf2[256];

	int i, N, L, n1, n2;

	N = atoi (argv[1]);
	L = atoi (argv[2]);

	char buf[L][256];

	fp = fopen (argv[3], "r");
	while (fgets (buf[0], 256, fp))
	{
		for (i = 1; i < L; i++)
			fgets (buf[i], 256, fp);
		fgets (buf2, 256, fp);
		sscanf (buf2 + 50, "%d / %d", &n1, &n2);

		if (n1 * 2 >= n2)
		{
			printf ("%s", buf[0]);
			for (i = 1; i < L; i++)
			{
				buf[i][25] = '\0';
				printf ("%s\n", buf[i] + 9);
			}
			printf ("%s\n", buf[L - 1] + 9);
		}
	}
	fclose (fp);
}
